class Nums(object):
    def __init__(self,num):
        self.num=num

    def __abs__(self):
        return abs(self.num)
my_num=Nums(-1)
print(abs(my_num))

class MyVector(object):
    def __init__(self,x,y):
        self.x=x
        self.y=y

    def __add__(self, other):
        re_vecotor=MyVector(self.x+other.x,self.y+other.y)
        return re_vecotor
    def __str__(self):
        return f'x:{self.x},y:{self.y}'
first_vec=MyVector(1,2)
second_vec=MyVector(3,4)
print(first_vec)
print(second_vec)
print(first_vec+second_vec)




